From: Stefano Stabellini Date: Fri, 11 Feb 2011 17:53:08 +0000 (+0000) Subject: libxl: do not call libxl__file_reference_unmap twice X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10782 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=33c82cfa4845bc10f9d7a78d7f282a775ad0d76b;p=xen.git libxl: do not call libxl__file_reference_unmap twice Fix double free due to libxl__file_reference_unmap(&info->kernel) called multiple times: first at the end of libxl__domain_build and then in libxl_domain_build_info_destroy. Signed-off-by: Stefano Stabellini Acked-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 3ee6672820..260d3c0a91 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -196,9 +196,6 @@ int libxl__domain_build(libxl_ctx *ctx, libxl_domain_build_info *info, uint32_t } ret = libxl__build_post(ctx, domid, info, state, vments, localents); out: - libxl__file_reference_unmap(&info->kernel); - if (!info->hvm) - libxl__file_reference_unmap(&info->u.pv.ramdisk); libxl__free_all(&gc); return ret;